package com.ruoyi.Warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Warehouse.mapper.InventorytransactionsMapper;
import com.ruoyi.Warehouse.domain.Inventorytransactions;
import com.ruoyi.Warehouse.service.IInventorytransactionsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存交易记录表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class InventorytransactionsServiceImpl implements IInventorytransactionsService 
{
    @Autowired
    private InventorytransactionsMapper inventorytransactionsMapper;

    /**
     * 查询库存交易记录表
     * 
     * @param transactionId 库存交易记录表主键
     * @return 库存交易记录表
     */
    @Override
    public Inventorytransactions selectInventorytransactionsByTransactionId(Long transactionId)
    {
        return inventorytransactionsMapper.selectInventorytransactionsByTransactionId(transactionId);
    }

    /**
     * 查询库存交易记录表列表
     * 
     * @param inventorytransactions 库存交易记录表
     * @return 库存交易记录表
     */
    @Override
    public List<Inventorytransactions> selectInventorytransactionsList(Inventorytransactions inventorytransactions)
    {
        return inventorytransactionsMapper.selectInventorytransactionsList(inventorytransactions);
    }

    /**
     * 新增库存交易记录表
     * 
     * @param inventorytransactions 库存交易记录表
     * @return 结果
     */
    @Override
    public int insertInventorytransactions(Inventorytransactions inventorytransactions)
    {
        return inventorytransactionsMapper.insertInventorytransactions(inventorytransactions);
    }

    /**
     * 修改库存交易记录表
     * 
     * @param inventorytransactions 库存交易记录表
     * @return 结果
     */
    @Override
    public int updateInventorytransactions(Inventorytransactions inventorytransactions)
    {
        return inventorytransactionsMapper.updateInventorytransactions(inventorytransactions);
    }

    /**
     * 批量删除库存交易记录表
     * 
     * @param transactionIds 需要删除的库存交易记录表主键
     * @return 结果
     */
    @Override
    public int deleteInventorytransactionsByTransactionIds(String transactionIds)
    {
        return inventorytransactionsMapper.deleteInventorytransactionsByTransactionIds(Convert.toStrArray(transactionIds));
    }

    /**
     * 删除库存交易记录表信息
     * 
     * @param transactionId 库存交易记录表主键
     * @return 结果
     */
    @Override
    public int deleteInventorytransactionsByTransactionId(Long transactionId)
    {
        return inventorytransactionsMapper.deleteInventorytransactionsByTransactionId(transactionId);
    }
}
